<!DOCTYPE html>
<html>
<head>
    <title>Scriptlet Example</title>
</head>
<body>
<%
// This is a scriptlet.  Notice that the "date"
// variable we declare here is available in the
// embedded expression later on.
System.out.println( "Evaluating date now" );
java.util.Date date = new java.util.Date();
%>
Hello!  The time is now <%= date %>
<%
    // This scriptlet generates HTML output
    out.println( String.valueOf( date ));
%>
</body>
</html>